import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { Lesson1Component } from './lesson1/lesson1.component';
import { Lesson2Component } from './lesson2/lesson2.component';
import { Lesson3Component } from './lesson3/lesson3.component';
import { Lesson4Component } from './lesson4/lesson4.component';
import { HeaderComponent } from './baseComponent/header/header.component';
import { MenuComponent } from './baseComponent/menu/menu.component';
import { MyComponentComponent } from './otherComponent/my-component/my-component.component';
import { MyDirectiveDirective } from './otherDirective/my-directive.directive';
import { MySelectDirectiveDirective } from './otherDirective/my-select-directive.directive';
import { IonicModule } from './ionic/ionic.module';

import { HighlightModule } from 'ngx-highlightjs';
import xml from 'highlight.js/lib/languages/xml';
import scss from 'highlight.js/lib/languages/scss';
import typescript from 'highlight.js/lib/languages/typescript';
import { Lesson3OneComponent } from './lesson3/lesson3-one/lesson3-one.component';
import { Lesson3TwoComponent } from './lesson3/lesson3-two/lesson3-two.component';
import { Lesson3ThreeComponent } from './lesson3/lesson3-three/lesson3-three.component';
import { Lesson4MenuComponent } from './lesson4/lesson4-menu/lesson4-menu.component';
import { Lesson5Component } from './lesson5/lesson5.component';
import { Lesson5OneComponent } from './lesson5/lesson5-one/lesson5-one.component';
import { Lesson5TwoComponent } from './lesson5/lesson5-two/lesson5-two.component';
import { Lesson5ThreeComponent } from './lesson5/lesson5-three/lesson5-three.component';
import { Lesson6Component } from './lesson6/lesson6.component';
import { Lesson7Component } from './lesson7/lesson7.component';
import { Lesson8Component } from './lesson8/lesson8.component';
import { Lesson9Component } from './lesson9/lesson9.component';
import { Lesson10Component } from './lesson10/lesson10.component';
import { Lesson11Component } from './lesson11/lesson11.component';
import { Lesson12Component } from './lesson12/lesson12.component';
import { Lesson4Module } from './lesson4/lesson4.module';
import { Lesson6OneComponent } from './lesson6/lesson6-one/lesson6-one.component';
import { Lesson6TwoComponent } from './lesson6/lesson6-two/lesson6-two.component';

export function hljsLanguages() {
  return [
    {name: 'typescript', func: typescript},
    {name: 'scss', func: scss},
    {name: 'xml', func: xml}
  ];
}
@NgModule({
  declarations: [
    AppComponent,
    Lesson1Component,
    Lesson2Component,
    Lesson3Component,
    Lesson4Component,
    HeaderComponent,
    MenuComponent,
    MyComponentComponent,
    MyDirectiveDirective,
    MySelectDirectiveDirective,
    Lesson3OneComponent,
    Lesson3TwoComponent,
    Lesson3ThreeComponent,
    Lesson4MenuComponent,
    Lesson5Component,
    Lesson5OneComponent,
    Lesson5TwoComponent,
    Lesson5ThreeComponent,
    Lesson6Component,
    Lesson7Component,
    Lesson8Component,
    Lesson9Component,
    Lesson10Component,
    Lesson11Component,
    Lesson12Component,
    Lesson6OneComponent,
    Lesson6TwoComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    IonicModule,
    AppRoutingModule,
    ReactiveFormsModule,
    Lesson4Module,
    HighlightModule.forRoot({
      languages: hljsLanguages
    })
  ],
  providers: [],
  bootstrap: [AppComponent],
  entryComponents: [
    Lesson3OneComponent,
    Lesson3TwoComponent,
    Lesson3ThreeComponent,
  ]
})
export class AppModule { }
